package com.zc.study.thread.多线程第三章节.thread3_1_1;

public class Thread1 extends Thread {
    private ThreadUtils threadUtils;
    public Thread1(ThreadUtils threadUtils) {
        this.threadUtils=threadUtils;
    }

    @Override
    public void run() {
        super.run();
     for (int i = 0 ; i<10;i++){
         threadUtils.addList(i);
         System.out.println("正在添加第"+(i+1)+"个元素");
         try {
             Thread.sleep(1000);
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
     }
    }
}
